package utils;

import java.util.HashMap;

public class TwoWayHashMap<S, T>{
	
	HashMap<S, T> forward = new HashMap<S, T>();
	HashMap<T, S> backward = new HashMap<T, S>();
	
	public T getForward(S s){
		return forward.get(s);
	}
	
	public S getBackward(T t){
		return backward.get(t);
	}	
	
	public void put(S s, T t){
		forward.put(s, t);
		backward.put(t, s);
	}
	
	public HashMap<S, T> getForwardMap(){
		return forward;
	}
	
	public HashMap<T, S> getBackwardMap(){
		return backward;
	}	
	
}